/**
 * Created with  SublimeText
 * @Author:      Lyle
 * @DateTime:    2016-12-1 21:57:21
 * @Description: 
 */
import 'babel-polyfill'
import React, { Component, PropTypes } from 'react'
import { Router, Route, IndexRoute, browserHistory, hashHistory } from 'react-router';
import _ from 'lodash'
import Util from './redux/modules/Tools/util'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import configureStore from './redux/store/configureStore'
import Config from './config'
//import './resource/css/admin.css' //HTML引入了
const store = configureStore();

//import component
import Home from './redux/containers/Home'
import Center from './redux/containers/Center'


class App extends Component {

    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        return (
            <Provider store={store}>
                <Router history={browserHistory}>
                  <Route path="/">
                    <IndexRoute component={Home}/>   
                    <Route path="/center" component={Center}/>
                    <Route path="/center/:childModuleName" component={Center}/> 
                  </Route>      
                </Router>
            </Provider>
        )
    }
};

render(<App />, document.getElementById('root'));
